home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / math / gle-3.000 / gle-3 / gle / manual / gle.txt
Text File  |  1995-02-07  |  70KB  |  1,930 lines

  1. Abstract
  2. --------
  3.      GLE  is  a  high  quality  graphics  package for scientists,
  4.      combining  a  user  friendly  interface with a full range of
  5.      facilities    for   producing  publication  quality  graphs,
  6.      diagrams, posters and slides.
  7.  
  8.      GLE  provides  LaTeXquality  fonts  together with a flexible
  9.      graphics  module  which  allows  the  user  to  specify  any
  10.      feature  of a graph (down to the line width of the subticks,
  11.      for example)
  12.  
  13.      Complex  pictures can be drawn with user defined subroutines
  14.      and simple looping structures.
  15.  
  16.      Current  device  drivers support DECWINDOWS, REGIS, TEK4010,
  17.      all  PC  graphics  cards,  VT100s,  HP-Plotters,  PostScript
  18.      Printers, EPSON Printers and LaserJet Printers.
  19.  
  20.      GLE  runs  on  both  VAXes and PCs, giving an identical user
  21.      interface on both platforms.
  22.  
  23.  
  24.  GLE Installation on a PC
  25.  ------------------------
  26.      To  install GLE, put the distribution disk into drive a: and
  27.      type:
  28.  
  29.           a:install
  30.  
  31.      GLE  requires  at  least  800K  of  disk space for a minimal
  32.      installation  and  3.3M  for  a full installation (including
  33.      all device drivers and fonts).
  34.  
  35.      GLE  also  requires 530K or more of free memory. Use the DOS
  36.      command  CHKDSK  to  check  this  figure.  If you don't have
  37.      enough  then take copies of your AUTOEXEC.BAT and CONFIG.SYS
  38.      files  and then remove as much as possible from these files.
  39.  
  40.      GLE  may  work  with  less  memory depending on what you are
  41.      drawing.
  42.  
  43.      The  installation disk contains a version of CGLE which will
  44.      make  use  of  epanded memory. This version can run with 70K
  45.      less  memory  but  if you don't have expanded memory then it
  46.      has  to  use  your  hard  disk instead which is a great deal
  47.      slower.
  48.  
  49.  Running GLE
  50.  -----------
  51.      To    get  GLE  running  interactively  you  must  be  on  a
  52.      VAXstation,  graphics terminal, or PC. If you are using a PC
  53.      you  should  make certain you have an up to date copy of GLE
  54.      (ask via VAX-mail to GRV::SRGHCXP or InterNET
  55.      srghcxp@grv.dsir.govt.nz)
  56.  
  57.  Running GLE on a PC
  58.  -------------------
  59.      The command to run GLE is:
  60.  
  61.           C:\GLE> cgle myfile.gle  
  62.  
  63.      Note:  the  command is `CGLE' not `GLE' but the directory is
  64.      `GLE', this is for historical reasons.
  65.  
  66.      To  print  a  GLE  file to the laser printer you would type:
  67.  
  68.           C:> psgle myfile 
  69.           C:> print myfile.ps 
  70.  
  71.      To  produce  an  .eps  file for inclusion in WordPerfect you
  72.      would type:
  73.  
  74.           C:> psgle myfile /eps 
  75.  
  76.      This will create a file called myfile.EPS.
  77.  
  78.      If  your  PC  is  connected  to  a  VAX computer which has a
  79.      PostScript  printer  you may copy MYFILE.PS to the VAX using
  80.      a  standard  file transfer program (e.g. FTP, KERMIT, VDISK)
  81.  
  82.      The  best  way to see what GLE can do is to have a play with
  83.      it,  simply  start  it  up and try out some of the examples:
  84.  
  85.           Press F3       (Load file) 
  86.           Press <enter>  (for a menu of GLE files)
  87.           Use arrow keys to select example, then press <enter>
  88.           Press F10 to draw the picture
  89.           Press ESC to get back to the GLE editor.
  90.           ...
  91.           When you find a graph try pressing F9 and modifying 
  92.           one of the fields (use F1 for an explanation of each 
  93.           field).
  94.  
  95.  Running GLE on a VAX
  96.  --------------------
  97.      The command to run GLE is:
  98.  
  99.           $ cgle myfile.gle
  100.           $ cgle myfile.gle /dev=regis
  101.           $ cgle myfile.gle /dev=x
  102.  
  103.      See    the    directory   CGLE_EXAMPLES:  for  examples  and
  104.      templates.  To  get access to these files from the GLE menus
  105.      use the commands:
  106.  
  107.           $ define workarea sys$login:,cgle_examples:
  108.           $ set default workarea:
  109.           $ cgle stack4b.gle      ! or any other example 
  110.  
  111.      If  your keyboard doesn't have the function keys F9 thru F14
  112.      you  can  use GOLD (PF1) followed by the numbers 9,0,1,2,3,4
  113.      (on the top of the QWERTYUIOP keypad).
  114.  
  115.      Keyboard Mappings:
  116.  
  117.      VT100         VT200         PC         Meaning 
  118.      GOLD 1         F11         F1         Help 
  119.      GOLD 2         F12         F2         Save 
  120.      GOLD 3         F13         F3         Load 
  121.      GOLD 4         F14         F4         Save-as 
  122.      GOLD 9         F9         F9         Graph-menu 
  123.      GOLD 0         F10         F10         Draw-it 
  124.      Control+Z         Control+Z     Control+Z     Exit/Escape 
  125.                          Alt+X         Exit/Escape 
  126.      Control+E         Control+E             Calls VAX EDT 
  127.      Control+F         Control+F             Toggle fast/slow text 
  128.      Control+R         Control+R     F5         Shows errors 
  129.                          Control+S     Shells to DOS 
  130.  
  131.      Supported  devices:  VT100,  REGIS  (VT125, VT240), TEK4010,
  132.      VWS, XWindows.
  133.  
  134.      Supported  output:  PostScript, HPGL, Epson, Epson 24pin, HP
  135.      Deskjet.
  136.  
  137.      To  create  a PostScript output file (.PS) and automatically
  138.      print it to the LASER queue you would type:
  139.  
  140.           $ cgle myfile /print
  141.  
  142.      To  produce  an  .eps  file  for inclusion in LaTeXyou would
  143.      type:
  144.  
  145.           $ cgle myfile /dev=eps
  146.  
  147.      To  produce  a  .ps  file  suitable  for printing to a laser
  148.      writer type:
  149.  
  150.           $ cgle myfile /dev=ps
  151.  
  152.  It didn't work, bugs!!!
  153.  -----------------------
  154.      If  the  installation fails, or one of the example GLE files
  155.      fails  to  work then the most likely reason is a shortage of
  156.      memory  due to too many memory resident programs/drivers. To
  157.      fix  this  remove these utilities from your autoexec.bat and
  158.      config.sys files temporarily.
  159.  
  160.      There  may  well  be  a  bug in your GLE file, try using the
  161.      trace option to find the bug.
  162.      On a PC:
  163.  
  164.           C:\GLE> psgle myfile /trace
  165.  
  166.      On a VAX:
  167.  
  168.           $ cgle myfile /dev=ps /trace
  169.  
  170.      Another  reason for a failure is a bug in GLE, Please report
  171.      bugs    to   Chris  Pugmire  (in%"srghcxp@grv.dsir.govt.nz",
  172.      grv::srghcxp)  so  they  can  be fixed. If possible, try and
  173.      find  a way of repeating the problem, then send relevant GLE
  174.      and    data   files  with  an  outline  of  what  is  wrong.
  175.  
  176.  Drawing a Line on a Page
  177.  ------------------------
  178.      Let's  start  with  drawing  a  line on the page. GLE has to
  179.      know  what size piece of paper you are working with. You can
  180.      tell it by giving a size command:
  181.  
  182.           size 18 27
  183.  
  184.      This  specifies  a  piece  of paper 18cm wide and 27cm high.
  185.      Now  you  must define a current point by moving to somewhere
  186.      on the page:
  187.  
  188.           amove 2 4       
  189.  
  190.      The  origin  (0,0)  is at the bottom left hand corner of the
  191.      page.  Now  suppose  we  wish to draw a line from this point
  192.      across 1 cm and up 2 cm:
  193.  
  194.           size 18 27
  195.           amove 2 4
  196.           rline 1 2
  197.  
  198.      That  was  a  relative  movement  as the x and y values were
  199.      given  as distances from the current point, alternatively we
  200.      could have used absolute coordinates:
  201.  
  202.           size 18 27
  203.           amove 2 4
  204.           aline 3 6               ! absolute. 
  205.  
  206.      Now  if  you  want  to  draw  some  text on this page at the
  207.      current point you would use the text command:
  208.  
  209.           text Hi there
  210.  
  211.      So  we  have  now  constructed  an  entire  GLE  program  as
  212.      follows, with the results illustrated below:
  213.  
  214.           size 12 8 box 
  215.           amove 2 4
  216.           rline 1 2
  217.           text Hi there
  218.  
  219.  Drawing a Simple Graph
  220.  ----------------------
  221.      This  section will describe how to go about drawing a simple
  222.      graph.
  223.  
  224.      The  following  data  points  are contained in a file called
  225.      TUT.DAT
  226.  
  227.          x   y
  228.          -----  (These top two lines do not appear in the file)
  229.          1   2
  230.          2   6
  231.          3   2
  232.          4   5
  233.          5   9
  234.  
  235.      The  data is in two columns with white space separating each
  236.      column  of  numbers.  The  following  commands  will  draw a
  237.      simple line graph of the data.
  238.  
  239.          size 6 3 
  240.          begin graph
  241.             size 6 3 
  242.             data tut.dat
  243.             yaxis min 0 
  244.             d1 line marker star msize .2
  245.          end graph
  246.  
  247.      The  first  size  command  defines  the size of the piece of
  248.      paper  which  may contain several graphs. The second defines
  249.      the  size  of  this  particular graph. The actual graph axes
  250.      are  by  default  0.7  of these dimensions. The ratio can be
  251.      changed with the vscale and hscale commands.
  252.  
  253.      Without  the  "yaxis min 0" command the yaxis would start at
  254.      2.0,  because  that is the minimum y value in the data. This
  255.      makes the graph easier to interpret.
  256.  
  257.      Changing the above d1 command to:
  258.  
  259.          d1 line marker circle 
  260.  
  261.      will  mark  each data point with a circle instead of a star.
  262.      See    appendix   A  for  a  list  of  other  marker  names.
  263.  
  264.      A  smooth  line  can  be  drawn  between  the data points by
  265.      changing the d1 command to:
  266.  
  267.          d1 line marker circle smooth
  268.  
  269.      The  order  of  the  commands  is not important, except that
  270.      circle    is  a  parameter  for  the  qualifier  marker  and
  271.      therefore  must  come  straight after it. E.g.,  d1  [marker
  272.      circle]  [line smooth]  [color blue]
  273.  
  274.  GLE Primitives
  275.  --------------
  276.      A   GLE  command  is  a  sequence  of  keywords  and  values
  277.      separated  by white space (one or more spaces or tabs). Each
  278.      command  must  begin  on  a  new  line.  Keywords may not be
  279.      abbreviated,  the  case  is not significant. All coordinates
  280.      are  expressed in centimetres from the bottom left corner of
  281.      the page.
  282.  
  283.      GLE  uses the concept of a current point which most commands
  284.      use.  For  example,  the  command aline 2 3 will draw a line
  285.      from    the    current   point  to  the  coordinates  (2,3).
  286.  
  287.      The  current  graphics  state  also  includes other settings
  288.      like  line width, color, font, 2d transformation matrix. All
  289.      of these can be set with various GLE commands.
  290.  
  291.  Graphics Primitives (a summary)
  292.  -------------------------------
  293.      ! comment 
  294.      @ xxx 
  295.      aline x y [arrow start] [arrow end] [arrow both] 
  296.      amove x y 
  297.      arc radius a1 a2 
  298.      arcto x1 y1 x2 y2 rad 
  299.      begin box [fill pattern] [add gap] [nobox] [name xyz] 
  300.      begin clip 
  301.      begin origin 
  302.      begin path [stroke] [fill pattern] [clip] 
  303.      begin rotate angle 
  304.      begin scale x y 
  305.      begin table 
  306.      begin text [width exp] 
  307.      begin translate x y 
  308.      bezier x1 y1 x2 y2 x3 y3 
  309.      bigfile filename.gle 
  310.      box x y [justify jtype] [fill color] [name xxx] [nobox] 
  311.      circle radius [fill pattern] 
  312.      closepath 
  313.      curve ix iy [ x1 y1 x y x y ... xn yn] ex ey 
  314.      define marker markername subroutine-name 
  315.      for var = exp1 to exp2 [step exp3] command [...] next var 
  316.      grestore 
  317.      gsave 
  318.      if exp then command [...] else command [...] end if 
  319.      include filename 
  320.      join object1.just sep object2.just 
  321.      marker marker-name [ scale-factor] 
  322.      postscript filename.eps width-exp height-exp 
  323.      rbezier x1 y1 x2 y2 x3 y3 
  324.      return exp 
  325.      reverse 
  326.      rline x y [arrow end] [arrow start] [arrow both] 
  327.      rmove x y 
  328.      save objectname 
  329.      set cap butt | round | square 
  330.      set color col 
  331.      set dashlen dashlen-exp 
  332.      set font font-name 
  333.      set fontlwidth line-width 
  334.      set hei character-size 
  335.      set join mitre | round | bevel 
  336.      set just left | center | right | tl | etc... 
  337.      set lstyle line-style 
  338.      set lwidth line-width 
  339.      sub sub-name paramter1 paramter2 etc 
  340.      text unquoted-text-string 
  341.      write string$
  342.  
  343.  Graphics Primitives (in detail)
  344.  -------------------------------
  345.  
  346.  ! comment
  347.      Indicates  the  start  of  a comment. GLE ignores everything
  348.      from   the  exclamation  point  to  the  end  of  the  line.
  349.  
  350.  @ xxx
  351.      Executes subroutine xxx.
  352.  
  353.  aline x y [arrow start] [arrow end] [arrow both] 
  354.      Draws  a  line  from  the  current  point  to  the  absolute
  355.      coordinates  (x,y),  which  then  becomes  the  new  current
  356.      point.  The  arrow qualifiers are optional, they draw arrows
  357.      at  the  start  or end of the line, the size of the arrow is
  358.      proportional to the current font height.
  359.  
  360.  amove x y
  361.      Changes  the  current  point  to  the  absolute  coordinates
  362.      (x,y).
  363.  
  364.  arc radius a1 a2
  365.      Draws  an  arc  of a circle in the anti-clockwise direction,
  366.      centered  at  the  current point, of radius radius, starting
  367.      at  angle a1 and finishing at angle a2. Angles are specified
  368.      in  degrees.  Zero  degrees  is  at three o'clock and Ninety
  369.      degrees is at twelve o'clock.
  370.  
  371.           arc 1.2 20 45
  372.  
  373.      The  command  narc  is  identical  but  draws the arc in the
  374.      clockwise  direction.  This is important when constructing a
  375.      path.
  376.  
  377.  arcto x1 y1 x2 y2 rad
  378.      Draws  a  line  from  the  current  point to (x1,y1) then to
  379.      (x2,y2)  but  fits  an  arc  of  radius  rad joining the two
  380.      vectors    instead   of  a  vertex  at  the  point  (x1,y1).
  381.  
  382.  begin block_name ... end block_name
  383.      There  are  several  block  structured commands in GLE. Each
  384.      begin  must  have  a  matching  end. Blocks which change the
  385.      current  graphics  state (e.g. scale, rotate, clip etc) will
  386.      restore  whatever  they  change  at  the  end  of the block.
  387.      Indentation  is  optional but should be used to make the GLE
  388.      program easier to read.
  389.  
  390.  begin box [fill pattern] [add gap] [nobox] [name xyz] 
  391.      Draws  a  box  around  everything  between begin box and end
  392.      box.  The option add adds a margin of margin cm to each side
  393.      of  the  box  to  make the box slightly larger than the area
  394.      defined  by the graphics primitives in the begin box end box
  395.      group  (to  leave a gap around text for example). The option
  396.      nobox stops the box outline from being drawn.
  397.  
  398.      The  name  option saves the coordinates of the box for later
  399.      use with the join command.
  400.  
  401.  begin clip 
  402.      This  saves  the  current clipping region. A clipping region
  403.      is  an  arbitrary  path  made  from  lines  and curves which
  404.      defines  the  area  on which drawing can occur. This is used
  405.      to  undo  the  effect  of a clipping region defined with the
  406.      begin  path  command. See the example CLIP.GLE in appendix B
  407.      at the end of the manual.
  408.  
  409.  begin origin
  410.      This  makes  the  current point the origin. This is good for
  411.      subroutines    or  something  which  has  been  drawn  using
  412.      amove,aline.  Everything  between  the  begin origin and end
  413.      origin  can  be moved as one unit. The current point is also
  414.      saved and restored.
  415.  
  416.  begin path [stroke] [fill pattern] [clip] 
  417.      Initialises  the  drawing  of  a filled shape. All the lines
  418.      and  curves  generated  until the next end path command will
  419.      be  stored and then used to draw the shape. stroke draws the
  420.      outline  of  the  shape, fill paints the inside of the shape
  421.      in  the given color and clip defines the shape as a clipping
  422.      region  for  all  future  drawing. Clipping and filling will
  423.      only work on PostScript devices.
  424.  
  425.  begin rotate angle
  426.      The  coordinate  system  is rotated anti-clockwise about the
  427.      current  point by the angle angle (in degrees). For example,
  428.      to  draw a line of text running vertically up the page (as a
  429.      Y axis label, say), type:
  430.  
  431.  begin scale x y
  432.      Everything  between  the  begin  and  end  is  scaled by the
  433.      factors  x  and  y.  E.g.,  scale 2 3 would make the picture
  434.      twice as wide and three times higher.
  435.  
  436.  begin table 
  437.      This  module  is an alternative to the TEXT module. It reads
  438.      the  spaces and tabs in the source file and aligns the words
  439.      accordingly.  A single space between two words is treated as
  440.      a real space, not an alignment space.
  441.  
  442.      With  a  proportionally  spaced font columns will line up on
  443.      the  left  hand side but not on the right hand side. However
  444.      with  a  fixed pitch font, like tt, everything will line up.
  445.  
  446.  begin text [width exp] 
  447.      This  module displays multiple lines/paragraphs of text. The
  448.      block  of text is justified according to the current justify
  449.      setting.  See  the  set  just  command  for a description of
  450.      justification settings.
  451.  
  452.      If  a  width  is specified the text is wrapped and justified
  453.      to  the  given  width. If a width is not given, each line of
  454.      text  is  drawn as it appears in the file. Remember that GLE
  455.      treats  text  in  the  same  way that LaTeXdoes, so multiple
  456.      spaces    are  ignored  and  some  characters  have  special
  457.      meaning. E.g, \ ^ _ & { }
  458.  
  459.      To  include  Greek  characters  in  the middle of text use a
  460.      backslash  followed  by  the  name  of the character. E.g., 
  461.      3.3\Omega S would produce ``3.3OS''.
  462.  
  463.      To  put  a space between the Omega and the S add a backslash
  464.      space  at  the  end. E.g.,  3.3\Omega\ S produces ``3.3O S''
  465.  
  466.      Sometimes  the  space  control characters (e.g. \:) are also
  467.      ignored,  this  may  happen  at  the  beginning of a line of
  468.      text.  In  this  case  use  the control sequence \glasswhich
  469.      will  trick GLE into thinking it isn't at the beginning of a
  470.      line. E.g.,
  471.  
  472.           text \glass \:\: Indented text
  473.  
  474.      There  are  several  LaTeXlike  commands  which  can be used
  475.      within text, they are:
  476.  
  477.          ^{}                 Superscript
  478.          _{}                 Subscript
  479.          \\                  Forced Newline
  480.          \_                  Underscore character
  481.          \,                  .5em (em = width of the letter `m')
  482.          \:                  1em space
  483.          \;                  2em space
  484.          \char{22}           Any character in current font
  485.          \chardef{a}{hello}  Define a character as a macro
  486.          \def\v{hello}       Defines a macro
  487.          \movexy{2}{3}       Moves the current text point
  488.          \glass              Makes move/space work on beginning of line
  489.          \rule{2}{4}         Draws a filled in box, 2cm by 4cm
  490.          \setfont{rmb}       Sets the current text font
  491.          \sethei{.3}         Sets the font height (in cm)
  492.          \setstretch{2}      Scales the quantity of glue between words
  493.          \lineskip{.1}       Sets the default distance between lines of text
  494.          \linegap{-1}        Sets the minimum required gap between lines 
  495.  
  496.  begin translate x y
  497.      Everything  between  the  begin  and end is moved x units to
  498.      the right and y units up.
  499.  
  500.  bezier x1 y1 x2 y2 x3 y3
  501.      Draws  a  Bezier cubic section from the current point to the
  502.      point  (x3,y3)  with  Bezier  cubic  control  points  at the
  503.      coordinates  (x1,y1)  and (x2,y2). For a full explanation of
  504.      Bezier  curves see the PostScript Language Reference Manual.
  505.  
  506.  bigfile filename.gle
  507.      This  command  reads  the  file one line at a time, compiles
  508.      each  line and executes it. This means it can read any sized
  509.      file.  However,  complex multi-line commands cannot be used.
  510.      Subroutines   can  be  used  but  not  defined,  inside  the
  511.      bigfile.  Note:  there  is  also  a  bigfile  option  in the
  512.      graphing module for large datasets.
  513.  
  514.  box x y [justify jtype] [fill color] [name xxx] [nobox] 
  515.      Draws  a  box, of width x and height y, with its bottom left
  516.      corner  at the current point. If the justify option is used,
  517.      the  box will be positioned relative to the specified point.
  518.      E.g.,  TL  = top left, CC = center center, BL = bottom left,
  519.      CENTRE  = bottom centre, RIGHT = bottom right, LEFT = bottom
  520.      left.  See  set  just  for  a  description  of justification
  521.      settings.
  522.  
  523.      If  a  fill  pattern  is  specified, the box will be filled.
  524.      Remember  that  white fill is different from no fill pattern
  525.      -  white  fill  will erase anything that was inside the box.
  526.  
  527.  circle radius [fill pattern] 
  528.      Draws  a circle at the current point, with radius radius. If
  529.      a  fill  pattern  is  specified  the  circle will be filled.
  530.  
  531.  closepath 
  532.      Joins  the  beginning  of a line to the end of a line. I.e.,
  533.      it does an aline to the end of the last amove.
  534.  
  535.  curve ix iy [ x1 y1 x y x y ... xn yn] ex ey 
  536.      Draws  a  curve  starting  at  the current point and passing
  537.      through  the  points  (x1,y1) (xn,yn), with an initial slope
  538.      of  (ix,iy) to (x1,y1) and a final slope of (ex,ey). All the
  539.      vectors  are  relative  movements  from  the  vector before.
  540.  
  541.  define marker markername subroutine-name
  542.      This  defines a new marker called markername which will call
  543.      the  subroutine  subroutine-name  whenever  it  is  used. It
  544.      passes  two  parameters,  the first is the requested size of
  545.      the  marker  and  the  second  is  a  value from a secondary
  546.      dataset  which  can  be  used  to vary size or rotation of a
  547.      marker for each point plotted.
  548.  
  549.  for var = exp1 to exp2 [step exp3] command [...] next var 
  550.      The  for  ...  next  structure  lets  you  repeat a block of
  551.      statements a number of times.
  552.  
  553.      GLE  sets  var  equal to exp1 and then repeats the following
  554.      steps.
  555.  
  556.      If  var  is  greater than exp2 then GLE commands are skipped
  557.      until the line after the next statement.
  558.  
  559.      The value exp3 is added to var.
  560.  
  561.      The  statements  between  the  for  and  next  statement are
  562.      executed. itemize
  563.  
  564.      If  exp1 is greater than exp2 then the loop is not executed.
  565.  
  566.  grestore
  567.      Restores  the  most  recently  saved graphics state. This is
  568.      the  simplest  way  to  restore  complicated transformations
  569.      such  as  rotations and translations. It must be paired with
  570.      a previous gsave command.
  571.  
  572.  gsave
  573.      Saves  the  current  graphics  transformation matrix and the
  574.      current point and the current color, font etc.
  575.  
  576.  if expression then command [...] else command [...] end if
  577.      If  expression  evaluates  to true, then execution continues
  578.      with  the statements up to the corresponding else, otherwise
  579.      the statements following the else and up to the
  580.      corresponding end if are executed.
  581.  
  582.           amove 3 3
  583.           if xpos()=3 then
  584.              text We are at x=3
  585.           else
  586.              text We are elsewhere
  587.           end if
  588.  
  589.      Note: end if is not spelt endif.
  590.  
  591.  include filename
  592.      The  commands  in  filename are read just as if they were in
  593.      the  current GLE file. With a large include file GLE may run
  594.      out  of  memory.  If  this  happens, use the bigfile command
  595.      instead  of include. Note: there is also a bigfile option in
  596.      the graphing module.
  597.  
  598.  join object1.just sep object2.just 
  599.      Draws  a line between two named objects. An object is simply
  600.      a  point  or a box which was given a name when it was drawn.
  601.  
  602.      The  justify  qualifiers  are the standard GLE justification
  603.      abbreviations  (e.g.  TL=top left, see set just for details)
  604.  
  605.      If  sep  is  written as -, a line is drawn between the named
  606.      objects e.g.
  607.  
  608.           join fred.tr - mary.tl
  609.  
  610.      Arrow  heads  can  be  included  at both ends of the line by
  611.      writing  sep  as  <->. Single arrow heads are produced by <-
  612.      and  ->.  Note  that sep must be separated from object1.just
  613.      and object2.just by white space.
  614.  
  615.      If  the justification qualifiers are omitted, a line will be
  616.      drawn  between  the  centres  of the two objects (clipped at
  617.      the  edges  of  the  rectangles  which  define the objects).
  618.  
  619.      See    Chapter    5  for  an  example  of  joining  objects.
  620.  
  621.  marker marker-name [ scale-factor] 
  622.      Draws  marker  marker-name at the current point. The size of
  623.      the  marker is proportional to the current font size, scaled
  624.      by  the  value  of  scale-factor  if  present.  Markers  are
  625.      referred  to  by  name,  eg.  square,  diamond, triangle and
  626.      fcircle.  Markers  beginning  with  the letter f are usually
  627.      filled  variants.  Markers  beginning with w are filled with
  628.      white  so  lines  are  not visible through the marker. For a
  629.      complete list of markers refer to Appendix A.1.
  630.  
  631.  postscript filename.eps width-exp height-exp 
  632.      Includes    an  encapsulated  postscript  file  into  a  GLE
  633.      picture,  the  postscript  picture will be scaled up or down
  634.      to  fit  the  width given. On the screen you will just see a
  635.      rectangle.
  636.  
  637.      Only  the width-exp is used to scale the picture so that the
  638.      aspect  ratio  is  maintained.  The  height  is only used to
  639.      display  a  rectangle  of  the  right  size  on  the screen.
  640.  
  641.  rbezier x1 y1 x2 y2 x3 y3
  642.      This  command is identical to the BEZIER command except that
  643.      the    points   are  all  relative  to  the  current  point.
  644.  
  645.  return exp
  646.      The  return  command  is used inside subroutines to return a
  647.      value.
  648.  
  649.  reverse 
  650.      Reverses  the  direction  of  the current path. This is used
  651.      when  filling  multiple  paths  in  order  that the Non-Zero
  652.      Winding  Rule  will know which part of the path is `inside'.
  653.  
  654.      With  the  Non-Zero  Winding Rule an imaginary line is drawn
  655.      through  the object. Every time a line of the object crosses
  656.      it  from  left  to right, one is added to the counter; every
  657.      time  a  line  of  the object crosses it from right to left,
  658.      one  is  subtracted from the counter. Everywhere the counter
  659.      is  non-zero is considered to be the `inside' of the drawing
  660.      and is filled.
  661.  
  662.  rline x y [arrow end] [arrow start] [arrow both] 
  663.      Draws  a  line  from  the  current  point  to  the  relative
  664.      coordinates  (x,y), which then become the new current point.
  665.      If  the current point is (5,5) then rline 3 -2 is equivalent
  666.      to  aline  8  3.  The  optional qualifiers on the end of the
  667.      command  will  draw  arrows at one or both ends of the line,
  668.      the  size  of  the arrow head is proportional to the current
  669.      font size.
  670.  
  671.  rmove x y
  672.      Changes  the current point to the relative coordinate (x,y).
  673.      If  the current point is (5,5) then rmove 3 -2 is equivalent
  674.      to amove 8 3.
  675.  
  676.  save objectname 
  677.      This  command  saves  a  point  for  later use with the join
  678.      command.
  679.  
  680.  set cap butt | round | square
  681.      Defines what happens at the end of a wide line.
  682.  
  683.  set color col
  684.      Sets  the  current  color for all future drawing operations.
  685.      There  are several pre-defined colors which can be specified
  686.      by name.
  687.  
  688.      black,  white,  red,  green,  blue,  cyan,  magenta, yellow,
  689.      grey10,  grey20  ...  grey90,  shade1  ... shade5, grid1 ...
  690.      grid5
  691.  
  692.      It   is  also  possible  to  specify  a  grey  scale  as  an
  693.      expression with 0.0 = black and 1.0 = white.
  694.  
  695.  set dashlen dashlen-exp
  696.      Sets  the  length  of  the  smallest  dash used for the line
  697.      styles.  This  command  MUST  come  before  the  set  lstyle
  698.      command.  This  may  be  needed  when scaling a drawing by a
  699.      large factor.
  700.  
  701.  set font font-name
  702.      Sets  the  current  font  to font-name. Valid font-names are
  703.      listed in Appendix A.2.
  704.  
  705.      There    are  three  types  of  font:  PostScript,  LaTeXand
  706.      Plotter.    They  will  all  work  on  any  device,  however
  707.      LaTeXfonts  are  drawn  in  outline on a plotter, and so may
  708.      not  look  very  nice.  PostScript fonts will be emulated by
  709.      LaTeXfonts on non-PostScript printers.
  710.  
  711.  set fontlwidth line-width
  712.      This  sets the width of lines to be used to draw the stroked
  713.      (Plotter  fonts)  on  a PostScript printer. This has a great
  714.      effect on their appearance.
  715.  
  716.  set hei character-size
  717.      Sets  the height of text. For historical reasons, concerning
  718.      lead  type  and  printing  conventions,  a  height  of  10cm
  719.      actually  results  in  capital  letters  about  6.5cm  tall.
  720.  
  721.  set join mitre | round | bevel 
  722.      Defines  how  two  wide  lines will be joined together. With
  723.      mitre,  the  outside  edges  of  the  join are extended to a
  724.      point  and  then  chopped off at a certain distance from the
  725.      intersection  of the two lines. With round, a curve is drawn
  726.      between the outside edges.
  727.  
  728.  set just left | center | right | tl | etc... 
  729.  
  730.      Sets    the  justification  which  will  be  used  for  text
  731.      commands.
  732.  
  733.  set lstyle line-style
  734.      Sets    the    current  line  style  to  line  style  number
  735.      line-style.  There are 9 predefined line styles (1--9). When
  736.      a  line  style  is  given with more than one digit the first
  737.      digit  is  read  as  a run length in black, the second a run
  738.      length  in  white,  the  third  a  run length in black, etc.
  739.  
  740.  set lwidth line-width
  741.      Sets  the  width  of lines to line-width cm. A value of zero
  742.      will  result  in  the  device default of about 0.02 cm, so a
  743.      lwidth  of  .0001  gives a thinner line than an lwidth of 0.
  744.  
  745.  sub sub-name parameter1 parameter2 etc
  746.      Defines  a  subroutine. The end of the subroutine is denoted
  747.      with  end  sub.  Subroutines must be defined before they are
  748.      used.
  749.  
  750.      Subroutines  can  be  called  inside any GLE expression, and
  751.      can  also  return  values.  The  parameters  of a subroutine
  752.      become    local    variables.   Subroutines  are  reentrant.
  753.  
  754.           sub tree x y a$
  755.              amove x y
  756.              rline 0 1
  757.              write a$
  758.              return x/y
  759.           end sub
  760.           @tree 2 4 "mytree"         (Normal call to subroutine)
  761.           slope = tree(2,4,"mytree")  (Using subroutine in an expression)
  762.  
  763.  text unquoted-text-string
  764.      This  is  the simplest command for drawing text. The current
  765.      point  is  unmodified  after  the text is drawn so following
  766.      one  text  command  with  another  will result in the second
  767.      line  of  text  being drawn on top of the first. To generate
  768.      multiple  lines  of  text,  use  the  begin  text  end  text
  769.      construct.
  770.  
  771.           text "Hi, how's tricks", said Jack!
  772.  
  773.  write string$
  774.      This  command  is  similar  to text except that it expects a
  775.      quoted  string,  string  variable, or string expression as a
  776.      parameter.
  777.  
  778.      The  built  in functions sqrt() and time$() are described in
  779.      appendix A.3.
  780.  
  781.      commanddescription
  782.  
  783.  Expressions
  784.  -----------
  785.      Wherever  GLE  is expecting a number it can be replaced with
  786.      an expression. For example
  787.  
  788.           rline 3 2
  789.  
  790.      and
  791.  
  792.           rline 9/3 sqrt(4)
  793.  
  794.      will produce the same result.
  795.  
  796.      An  expression in GLE is delimited by white space, so it may
  797.      not  contain  any  spaces  -  `  rline 3*3 2' is valid but `
  798.      rline 3 * 3 2' will not work.
  799.  
  800.      Or  `  let  d2  =  3+sin(d1)'  will  work  and ` let d2= 3 +
  801.      sin(d1) ' won't.
  802.  
  803.      Expressions  may  contain numbers, arithmetic operators ( +,
  804.      -,  *,  /, ^(to the power of)), relational operators ( >, <,
  805.      =>,  <=,  =, <>) boolean operators ( AND, OR), variables and
  806.      built-in functions.
  807.  
  808.      When  GLE  is expecting a color or marker name (like `green'
  809.      or  `circle')  it  can  be  given  a  string variable, or an
  810.      expression enclosed in braces).
  811.  
  812.      GLE  provides  a  large  number of built in functions, these
  813.      are listed in Appendix A.3.
  814.  
  815.  Functions Inside Expressions
  816.  ----------------------------
  817.  
  818.  xg(), yg()
  819.      With  these  functions  it is possible to move to a position
  820.      on  a  graph  using the graph's axis units. To draw a filled
  821.      box  on  a  graph, at position x=948, y=.004 measured on the
  822.      graph axis:
  823.  
  824.           begin graph
  825.              xaxis min 100 max 2000
  826.              yaxis min -.01 max .01
  827.              ...
  828.           end graph
  829.           amove xg(948) yg(.004)
  830.           box 2 2 fill grey10 
  831.  
  832.  xend(), yend()
  833.      These  functions  return  the  end  point  of the last thing
  834.      drawn.  This  is  of  particular interest when drawing text.
  835.  
  836.           text abc
  837.           set color blue
  838.           text def      
  839.  
  840.      This  would  draw the def on top of the abc. To draw the def
  841.      immediately  following the abc simply do the following (Note
  842.      that absolute move is used, not relative move):
  843.  
  844.  xpos(), ypos()
  845.      Returns  the  current  x  and  y  points. commanddescription
  846.  
  847.  The Graph Module
  848.  ----------------
  849.      A  graph  should  start  with  begin  graph and end with end
  850.      graph.  The  data to be plotted are organised into datasets.
  851.      A  dataset  consists  of  a series of (X,Y) coordinates, and
  852.      has  a name based on the letter ``d'' and a number between 1
  853.      and 99, eg. d1
  854.  
  855.      The  name  dn  can  be  used  to  define  a  default for all
  856.      datasets.  Many  graph commands described below start with d
  857.      n.  This  would  normally  be replaced by a specific dataset
  858.      number e.g.,
  859.  
  860.           d3 marker diamond
  861.  
  862.      For  each  xaxis  command  there  is  a corresponding yaxis,
  863.      y2axis  and  x2axis  command  for  setting  the top left and
  864.      right    hand   axes.  These  commands  are  not  explicitly
  865.      mentioned in the following descriptions.
  866.  
  867.  Graph Commands (a summary)
  868.  --------------------------
  869.      data filename [d1 d2 d3 ... ] [d1=c1,c3 ] 
  870.      dn bigfile "all.dat,xc,yc" [marker mname] [line] 
  871.      dn err d5 errwidth width-exp errup nn% errdown d4 
  872.      dn herr d5 herrwidth width-exp herrleft nn% errright d4 
  873.      dn key "Dataset title" 
  874.      dn line
  875.      dn lstyle line-style lwidth line-width color col 
  876.      dn marker marker-name [msize marker-size] [mdata dn] 
  877.      dn nomiss 
  878.      dn smooth | smoothm 
  879.      dn xmin x-low xmax x-high ymin y-low ymax y-high 
  880.      fullsize 
  881.      hscale exp 
  882.      key pos tl nobox hei exp offset xexp yexp 
  883.      let ds = exp [from low to high step exp ] 
  884.      nobox 
  885.      size x y 
  886.      title  "title"  [hei  ch-hei]  [color col] [font font] [dist
  887.      cm] 
  888.      vscale exp 
  889.      x2labels on 
  890.      xaxis | yaxis | x2axis | y2axis
  891.      xaxis color col font font-name hei exp-cm lwidth exp-cm 
  892.      xaxis dsubticks sub-distance 
  893.      xaxis grid 
  894.      xaxis log 
  895.      xaxis min low max high dpoints n 
  896.      xaxis nofirst nolast 
  897.      xaxis nticks number dticks distance 
  898.      xaxis off 
  899.      xaxis shift cm-exp 
  900.      xlabels font font-name hei char-hei color col 
  901.      xnames "name" "name" ... 
  902.      xplaces pos1 pos2 pos3 ... 
  903.      xside color col lwidth line-width off 
  904.      xsubticks lstyle num lwidth exp length exp off 
  905.      xticks lstyle num lwidth exp length exp off 
  906.      xtitle  "title"  [hei  ch-hei] [color col] [font font] [dist
  907.      cm] 
  908.      y2title "text-string" [rotate]
  909.  
  910.      bar dx,... dist spacing
  911.      bar dx,... from dy,...
  912.      bar dn,... width xunits,... fill col,... color col,... 
  913.  
  914.      fill x1, d3 color green xmin val xmax val 
  915.      fill d4,x2 color blue ymin val ymax val 
  916.      fill d3,d4 color green xmin val xmax val 
  917.      fill d4 color green xmin val xmax val 
  918.  
  919.  Graph Commands (in detail)
  920.  --------------------------
  921.  
  922.  data filename [d1 d2 d3 ... ] [d1=c1,c3 ] 
  923.      Specifies  the name of a file to read data from. By default,
  924.      the  data  will  be  read into the next free datasets unless
  925.      the    optional    specific  dataset  names  are  specified.
  926.  
  927.      A  dataset  consists  of  a series of (X,Y) coordinates, and
  928.      has  a name based on the letter d and a number between 1 and
  929.      99,  e.g.  d1  or  d4.  Up  to  99  datasets may be defined.
  930.  
  931.      From  a file with 3 columns the command ` data xx.dat' would
  932.      read  the first and second columns as the x and y values for
  933.      dataset  1 (d1) and the first and third columns as the x and
  934.      y  values  for  dataset  2 (d2). The next data command would
  935.      use dataset 3 (d3).
  936.  
  937.      A  data  file  for  two  datasets looks like this (*=missing
  938.      value):
  939.  
  940.          1  2.7   3
  941.          2  5     *
  942.          3  7.8   7
  943.          4  9     4
  944.  
  945.      The  first  coordinate  of dataset d1 would then be ( 1,2.7)
  946.      and  the  first  coordinate  of  dataset d2 would be ( 1,3).
  947.  
  948.      The  option d3=c2,c3 allows particular columns of data to be
  949.      read  into  a  dataset, d3 would read x values from column 2
  950.      and y values from column 3.
  951.  
  952.  dn bigfile "all.dat,xc,yc" [marker mname] [line] 
  953.      The  bigfile  option  allows  a  dataset to be read as it is
  954.      drawn,  (rather  than being complete read into memory before
  955.      it  is  drawn)  this  means  that very large datasets can be
  956.      drawn  on  a  PC  without  running  out  of memory. The axis
  957.      minimum  and  maximum  must  be specified (using the command
  958.      xaxis min exp max exp.
  959.  
  960.      By  default  the  first two columns of the data file will be
  961.      read    in,  but  other  columns  may  be  specified.  E.g.,
  962.      all.dat,3,2  would  read x values from column 3 and y values
  963.      from  column  2.  Or,  to  read the 4th dataset, specify the
  964.      file as all.dat,1,5
  965.  
  966.      If  the  x column is specified as '0' then GLE will generate
  967.      the x data points. E.g., 1,2,3,4,5...
  968.  
  969.      Many  (but  not  all)  of the normal dn commands can be used
  970.      with  the bigfile command. E.g., marker, lstyle, xmin, xmax,
  971.      ymin,  ymax,  color and lwidth. You cannot use commands like
  972.      let or bar with the bigfile command.
  973.  
  974.  dn err d5 errwidth width-exp dn errup nn% errdown d4 
  975.      For  drawing  error  bars  on a graph. The error bars can be
  976.      specified  as  an  absolute  value, as a percentage of the y
  977.      value,  or  as  a dataset. The up and down error bars can be
  978.      specified separately e.g.,
  979.  
  980.           d3 err .1
  981.           d3 err 10%
  982.           d3 errup 10% errdown d2
  983.           d3 err d1 errwidth .2
  984.  
  985.  dn herr d5 herrwidth width-exp dn herrleft nn% errright d4 
  986.      These  commands  are  identical  to  the  error bar commands
  987.      above  except  that  they  will  draw bars in the horizontal
  988.      plane.
  989.  
  990.  dn key "Dataset title" 
  991.      If  a  dataset  is  given  a  title  like this a key will be
  992.      drawn.  Use the key command (below, after hscale) to set the
  993.      size  and  position  of the key. Use the key module (Chapter
  994.      4) to draw more complex keys.
  995.  
  996.  dn line
  997.      This  tells  GLE  to  draw  lines  between the points of the
  998.      dataset.  By  default  GLE  will  not draw lines or markers,
  999.      this is often the reason for a blank graph.
  1000.  
  1001.      If  a dataset has missing values GLE will not draw a line to
  1002.      the  next  real  value,  which leaves a gap in the curve. To
  1003.      avoid  this  behavior simply use the nomiss qualifier on the
  1004.      dn  command used to define the line. This simply throws away
  1005.      missing  values  so  that lines are drawn from the last real
  1006.      value to the next real value.
  1007.  
  1008.  dn lstyle line-style lwidth line-width color col 
  1009.      These  qualifiers  are  all fairly self explanatory. See the
  1010.      lstyle  command  in Chapter~2 for details of specifying line
  1011.      styles.
  1012.  
  1013.  dn marker marker-name [msize marker-size] [mdata dn] 
  1014.      Specifies  the marker to be used for the dataset. There is a
  1015.      set  of  pre-defined  markers  (refer  to Appendix A.1 for a
  1016.      list)  which can be specified by name (e.g., circle, square,
  1017.      triangle,  diamond,  cross,  ...).  Markers  can  also  be a
  1018.      user-defined  subroutine  (See  the define marker command in
  1019.      Chapter  2).  The mdata option allows a secondary dataset to
  1020.      be  defined  which will be used to pass another parameter to
  1021.      the  marker  subroutine, this allows each marker to be drawn
  1022.      at a different angle,size or color.
  1023.  
  1024.      The  msize  qualifier sets the marker size for that dataset.
  1025.      The  size  is  a  character height in cm, so that the actual
  1026.      size  of  the  markers  will  be  about  0.7  of this value.
  1027.  
  1028.  dn nomiss 
  1029.      If  a  dataset  has missing values, GLE will not draw a line
  1030.      to  the next real value, which leaves a gap in the curve. To
  1031.      avoid  this  behavior simply use the nomiss qualifier on the
  1032.      dn  command  used  to  define  the line. This simply ignores
  1033.      missing values.
  1034.  
  1035.  dn smooth | smoothm 
  1036.      This  will make GLE draw a smoothed line through the points.
  1037.      A  third  degree polynomial is fitted piecewise to the given
  1038.      points.
  1039.  
  1040.      The    smoothm   alternative  will  work  for  multi  valued
  1041.      functions,  i.e., functions which have more than one y value
  1042.      for each x value.
  1043.  
  1044.  dn xmin x-low xmax x-high ymin y-low ymax y-high 
  1045.      These  commands map the dataset onto the graph's boundaries.
  1046.      The  data  will  be drawn as if the X axis was labelled from
  1047.      x-low  to  x-high  (regardless  of  how the axis is actually
  1048.      labelled).  A  point in the dataset at X = x-low will appear
  1049.      on the left hand edge of the graph.
  1050.  
  1051.  fullsize 
  1052.      This  is  equivalent  to  vscale  1,  hscale 1, noborder. It
  1053.      makes  the  graph size command specify the size and position
  1054.      of  the  axes  instead  of  the  size of the outside border.
  1055.  
  1056.  hscale exp 
  1057.      Scales  the  length  of  the  yaxis. See vscale. The default
  1058.      value is 0.7.
  1059.  
  1060.  key pos tl nobox hei exp offset xexp yexp 
  1061.      This  command  allows the features of a key to be specified.
  1062.      The  pos  qualifier  sets  the  position  of  the key. E.g.,
  1063.      tl=topleft, br=bottomright, etc.
  1064.  
  1065.  let ds = exp [ from low to high step exp ] 
  1066.      This  command  defines  a  new  dataset  as the result of an
  1067.      expression  on  the  variable  x  over a range of values. It
  1068.      also  allows the use of other datasets. E.g., to generate an
  1069.      average of two datasets:
  1070.  
  1071.           data aa.dat d1 d2
  1072.           let d3 = d1+d2/2
  1073.  
  1074.      Or to generate data from scratch:
  1075.  
  1076.           let d1 = sin(x)+log(x) from 1 to 100 step 1
  1077.  
  1078.      If  the  xaxis is a LOG axis then the step option is read as
  1079.      the  number of steps to produce rather than the size of each
  1080.      step.
  1081.  
  1082.      NOTE:  The  spacing  around  the  `='  sign  and the lack of
  1083.      spaces inside the expression are necessary.
  1084.  
  1085.  nobox 
  1086.      This removes the outer border from the graph.
  1087.  
  1088.  size x y 
  1089.      Defines  the  size  of  the graph in cm. This is the size of
  1090.      the  outside box of a graph. The default size of the axes of
  1091.      the  graph  will  be  70%  of this, (see vscale and hscale).
  1092.      This command is required.
  1093.  
  1094.      title  "title"  [hei  ch-hei]  [color col] [font font] [dist
  1095.  cm] 
  1096.      This  command  gives  the graph a centred title. The list of
  1097.      optional   keywords  specifies  features  of  it.  The  dist
  1098.      command    is   used  for  moving  the  title  up  or  down.
  1099.  
  1100.  vscale exp 
  1101.      This  sets  the  width  of the axis relative to the width of
  1102.      the  graph.  For example with a 10cm wide graph and a vscale
  1103.      of  .6  the x axis would be 6cm long. A setting of 1.0 makes
  1104.      the  xaxis  the same length as the width of the graph, which
  1105.      is  useful for positioning some graphs. The default value is
  1106.      0.7.
  1107.  
  1108.  x2labels on 
  1109.      This  command `activates' the numbering of the x2axis. There
  1110.      is  a corresponding command ` y2axis on' which will activate
  1111.      y2axis numbering.
  1112.  
  1113.  xaxis | yaxis | x2axis | y2axis
  1114.      A  graph  is  considered to have four axes: The normal xaxis
  1115.      and  yaxis  as  well  as the top axis (x2axis) and the right
  1116.      axis (y2axis).
  1117.  
  1118.      Any  command defining an xaxis setting will also define that
  1119.      setting for the x2axis.
  1120.  
  1121.      The  secondary  axes  x2 and y2 can be modified individually
  1122.      by  starting  the  axis  command with the name of that axis.
  1123.      E.g.,
  1124.  
  1125.  xaxis color col font font-name hei exp-cm lwidth exp-cm 
  1126.      These  axis qualifiers affect the color, lstyle, lwidth, and
  1127.      font  used for drawing the xaxis (and the x2axis). These can
  1128.      be  overriden  with  more  specific commands. E.g., ` xticks
  1129.      color  blue'  would override the axis color when drawing the
  1130.      ticks.  The subticks would also be blue as they pick up tick
  1131.      settings by default.
  1132.  
  1133.  xaxis dsubticks sub-distance 
  1134.      See xaxis nticks below.
  1135.  
  1136.  xaxis grid 
  1137.      This  command makes the xaxis ticks long enough to reach the
  1138.      x2axis  and the yaxis ticks long enough to reach the y2axis.
  1139.      When  used  with  both the x and y axes this produces a grid
  1140.      over  the  graph.  Use the xticks lstyle command to create a
  1141.      faint grid.
  1142.  
  1143.  xaxis log 
  1144.      Draws  the  axis  in  logarithmic style, and scales the data
  1145.      logarithmically  to  match  (on the x2axis or y2axis it does
  1146.      not  affect  the  data, only the way the ticks and labelling
  1147.      are drawn)
  1148.  
  1149.      Be  aware  that  a  straight  line should become curved when
  1150.      drawn  on  a  log  graph.  This will only happen if you have
  1151.      enough points or have used the smooth option.
  1152.  
  1153.  xaxis min low max high dpoints n 
  1154.      Sets  the minimum and maximum values on the xaxis. This will
  1155.      determine  both  the  labelling  of the axis and the default
  1156.      mapping  of  data  onto the graph. To change the mapping see
  1157.      the   dataset  dn  commands  xmin,  ymin,  xmax,  and  ymax.
  1158.  
  1159.      The  dpoints  option  specifies the number of decimal points
  1160.      that  should  be  displayed.  e.g.  with  a value of 3 these
  1161.      numbers  (0,  0.333333,  0.6666667,  1) would become (0.000,
  1162.      0.333, 0.667, 1.000)
  1163.  
  1164.  xaxis nofirst nolast 
  1165.      These  two  switches  simply  remove  the  first or last (or
  1166.      both)  labels  from the graph. This is useful when the first
  1167.      labels  on  the  x  and  y axis are too close to each other.
  1168.  
  1169.  xaxis nticks number dticks distance 
  1170.      nticks  specifies the number of ticks along the axis. dticks
  1171.      specifies    the    distance  between  ticks  and  dsubticks
  1172.      specifies  the  distance  between  subticks. For example, to
  1173.      get  one subtick between every main tick with main ticks 3cm
  1174.      apart, simply specify dsubticks 1.5.
  1175.  
  1176.      By  default  ticks  are drawn on the inside of the graph. To
  1177.      draw them on the outside use the command:
  1178.  
  1179.           xticks length -.2
  1180.           yticks length -.2
  1181.  
  1182.  xaxis off 
  1183.      Turns  the  whole  axis  off --- labels, ticks, subticks and
  1184.      line.  Often  the  x2axis  and y2axis are not required, they
  1185.      could    be    turned   off  with  the  following  commands:
  1186.  
  1187.           x2axis off
  1188.           y2axis off
  1189.  
  1190.  xaxis shift cm-exp 
  1191.      This  moves  the  labelling  to  the left or right, which is
  1192.      useful  when  the  label  refers to the data between the two
  1193.      values.
  1194.  
  1195.  xlabels font font-name hei char-hei color col 
  1196.      This  command controls the appearance of the axis labels but
  1197.      not the axis title.
  1198.  
  1199.  xnames "name" "name" ... 
  1200.      This  command replaces the numeric labelling with absolutely
  1201.      anything.  Given data consisting of five measurements, taken
  1202.      from Monday to Friday, one per day then
  1203.  
  1204.           xaxis min 0 max 6 dticks 1
  1205.           xnames "" "Mon" "Tue" "Wed" "Thu" "Fri"  ""
  1206.  
  1207.      would  give  the  desired  result.  Note  it is essential to
  1208.      define  a  specific  axis  minimum,  maximum,  dticks, etc.,
  1209.      otherwise  the  labels  may  not  correspond  to  the  data.
  1210.  
  1211.      If  there  isn't  enough  room on the line for all the names
  1212.      then simply use an extra xnames command.
  1213.  
  1214.  xplaces pos1 pos2 pos3 ... 
  1215.      This  is  similar  to  the xnames command but it specifies a
  1216.      list  of  points  which  should  be  labelled.  This  allows
  1217.      labelling  which  isn't  equally  spaced.  The above example
  1218.      with    days  of  the  week  could  be  written  like  this:
  1219.  
  1220.           xplaces 1  2  5
  1221.           xplaces 7
  1222.           xnames "Mon" "Tue" "Fri" "Sun"
  1223.       
  1224.  
  1225.      If  there  isn't  enough  room on the line for all the names
  1226.      then simply use an extra xplaces command.
  1227.  
  1228.  xside color col lwidth line-width off 
  1229.      This  command controls the appearance of the axis line, i.e.
  1230.      the line to which the ticks are attached.
  1231.  
  1232.  xsubticks lstyle num lwidth exp length exp off 
  1233.      This  command  gives  fine  control of the appearance of the
  1234.      axis subticks.
  1235.  
  1236.  xticks lstyle num lwidth exp length exp off 
  1237.      This  command  gives  fine  control of the appearance of the
  1238.      axis  ticks. Note: To get ticks on the outside of the graph,
  1239.      i.e.  pointing  outwards,  specify  a  negative tick length:
  1240.  
  1241.           xticks length -.2
  1242.           yticks length -.2
  1243.  
  1244.      xtitle  "title"  [hei  ch-hei] [color col] [font font] [dist
  1245.  cm] 
  1246.      This  command  gives  the axis a centered title. The list of
  1247.      optional  keywords  specify features of it. The dist command
  1248.      is used for moving the title up or down.
  1249.  
  1250.  y2title "text-string" [rotate] 
  1251.      By  default  the  y2title is written vertically upwards. The
  1252.      optional    rotate    keyword   changes  this  direction  to
  1253.      downwards.  The  rotate  option  is  specific to the y2title
  1254.      command.
  1255.  
  1256.      commanddescription
  1257.  
  1258.  Bar Graphs
  1259.  ----------
  1260.      Drawing  a  bar  graph  is  a subcommand of the normal graph
  1261.      module.  This  allows  bar  and line graphs to be mixed. The
  1262.      bar  command  is  quite complex as it allows a great deal of
  1263.      flexibility.  The  same  command allows stacked, overlapping
  1264.      and grouped bars.
  1265.  
  1266.      For  stacked  bars use separate bar commands as in the first
  1267.      example below:
  1268.  
  1269.           bar d1 fill black
  1270.           bar d2 from d1 fill grey10
  1271.  
  1272.      For  grouped bars put all the datasets in a list on a single
  1273.      bar command:
  1274.  
  1275.           bar d1,d2,d3 fill grey10,grey40,black
  1276.  
  1277.  bar dx,... dist spacing
  1278.      Specifies  the  distance  between bars in dataset(s) dx,....
  1279.      The  distance is measured from the left hand side of one bar
  1280.      to  the  left  hand side of the next bar. A distance of less
  1281.      than  the  width  of  a bar results in the bars overlapping.
  1282.  
  1283.  bar dx,... from dy,...
  1284.      This  sets the starting point of each bar in datasets dx,...
  1285.      to  be  at  the  value  in  datasets dy,..., and is used for
  1286.      creating  stacked bar charts. Each layer of the bar chart is
  1287.      created with an additional bar command.
  1288.  
  1289.           bar d1,d2 
  1290.           bar d3,d4 from d1,d2
  1291.           bar d5,d6 from d3,d4
  1292.  
  1293.      Note  1:  It  is  important that the values in d3 and d4 are
  1294.      greater than the values in d1 and d2.
  1295.  
  1296.      Note  2:  Data  files for stacked bar graphs should not have
  1297.      missing  values,  replace the * character with the number on
  1298.      its left in the data file.
  1299.  
  1300.  bar dn,... width xunits,... fill col,... color col,... 
  1301.      The  rest of the bar qualifiers are fairly self explanatory.
  1302.      When  several  datasets  are  specified,  separate them with
  1303.      commas (with no spaces between commas).
  1304.  
  1305.           bar d1,d2 width 0.2 dist 0.2 fill grey10,grey20 color red,green
  1306.  
  1307.      commanddescription
  1308.  
  1309.  Filling Between Lines
  1310.  ---------------------
  1311.  
  1312.  fill x1, d3 color green xmin val xmax val 
  1313.      Fills  between  the  xaxis  and  a dataset, use the optional
  1314.      xmin,  xmax,  ymin, ymax qualifiers to clip the filling to a
  1315.      smaller region
  1316.  
  1317.  fill d4,x2 color blue ymin val ymax val 
  1318.      This    command    fills  from  a  dataset  to  the  x2axis.
  1319.  
  1320.  fill d3,d4 color green xmin val xmax val 
  1321.      This command fills between two datasets.
  1322.  
  1323.  fill d4 color green xmin val xmax val 
  1324.      This  command  treats the dataset as a polygon and fills it.
  1325.      The dataset should be a closed polygon.
  1326.  
  1327.      commanddescription
  1328.  
  1329.  Notes on Drawing Graphs
  1330.  -----------------------
  1331.  
  1332.  Importance of Order
  1333.      Most  of  the graph commands can appear in any order, but in
  1334.      some cases order is significant.
  1335.  
  1336.      As  some  let  commands  operate on data which has been read
  1337.      into  datasets,  the  data  commands  should precede the let
  1338.      commands.
  1339.  
  1340.      The  wildcard  dn  command  should appear before specific d1
  1341.      commands which it will override.
  1342.  
  1343.      By  default  xaxis  commands  also  change  the  x2axis, and
  1344.      xlabels   commands  also  change  x2labels,  so  to  specify
  1345.      different  settings  for  the  x  and  x2  axes,  put the x2
  1346.      settings after the x settings.
  1347.  
  1348.           begin graph
  1349.              size 10 10
  1350.              data a.dat
  1351.              let d2 = d1*3
  1352.              dn marker square lstyle 3   ! sets d1 and d2
  1353.              d2 marker dot
  1354.              xaxis color green
  1355.              xticks color blue
  1356.              x2axis color black
  1357.           end graph
  1358.  
  1359.  Line Width
  1360.      When  scaling a graph up or down for publication the default
  1361.      line  width  may  need changing. To do this simply specify a
  1362.      set lwidth command before beginning the graph.
  1363.  
  1364.           size 10 10 
  1365.           set lwidth .1
  1366.           begin graph
  1367.              ...
  1368.           end graph
  1369.  
  1370.  The KEY module
  1371.  --------------
  1372.      This  module  is  used  for  drawing  keys for graphs. It is
  1373.      completely separate from the graph module.
  1374.  
  1375.      Specify  a  position  for the key, the size of the lettering
  1376.      and  then for each dataset specify marker, color, lstyle and
  1377.      fill pattern:
  1378.  
  1379.           begin graph
  1380.              ...
  1381.           end graph
  1382.           begin key
  1383.              hei .5
  1384.              position tr
  1385.              text "Green trees" marker heart msize .2 fill grey10
  1386.              text "Red trees" lstyle 3 marker heart fill blue
  1387.              text "Oranges" marker circle lstyle 6 fill black
  1388.           end key
  1389.  
  1390.      All  commands to do with a particular line of the key module
  1391.      MUST appear on the same line.
  1392.  
  1393.  Key commands
  1394.  ------------
  1395.  
  1396.  offset x-exp y-exp
  1397.      Specifies  the  offset  in  cm from the current point to the
  1398.      bottom  left  hand  corner of the graph. This command should
  1399.      be on a line of its own.
  1400.  
  1401.  position justify-exp
  1402.      This  is an alternative to the OFFSET command. It allows you
  1403.      to  specify  a  position  on the graph, e.g., tl = top left.
  1404.      This  command  should  be on a line of its own. See set just
  1405.      for a list of justify settings.
  1406.  
  1407.  text str-exp
  1408.      The  text  which  will  be displayed on the end of the line.
  1409.  
  1410.  lstyle style-num
  1411.      The  line  style which will be used for the short line drawn
  1412.      in the key.
  1413.  
  1414.  marker marker-name
  1415.      The  marker  which  will  be  used for that line of the key.
  1416.  
  1417.  msize exp
  1418.      Specifies the size of the markers in cm.
  1419.  
  1420.  mscale exp
  1421.      Specifies  how  much  to scale the size of the marker. E.g.,
  1422.      0.5    would  produce  a  marker  half  as  big  as  normal.
  1423.  
  1424.  color color-name
  1425.      The colour of the text, line and marker.
  1426.  
  1427.  hei cm-exp
  1428.      This  sets  the height of the text used to draw the key. The
  1429.      key  will change in size to fit around the text. If you omit
  1430.      this command the current font size is used.
  1431.  
  1432.  fill fill-pattern
  1433.      The fill pattern used in that line of the key.
  1434.  
  1435.      commanddescription
  1436.  
  1437.  Advanced features of GLE
  1438.  ------------------------
  1439.      This  chapter  covers  the advanced features of GLE. Some of
  1440.      these  features  will  not  give exactly the same results on
  1441.      the   PC  screen  as  you  would  get  when  printing  to  a
  1442.      PostScript  printer. E.g., clipping to an arbitrary shape is
  1443.      only  implemented  in  the  PostScript driver but most other
  1444.      features  will  give  as  close  as  possible representation
  1445.      given the limitations of the screen.
  1446.  
  1447.  Color
  1448.  -----
  1449.      Internally  GLE  treats color and fill identically, they are
  1450.      simply  an  intensity  of  Red,  Green and Blue. Each of the
  1451.      predefined  color  names  (yellow,grey20,orange,red)  simply
  1452.      define the ratio of red, green and blue.
  1453.  
  1454.      There  are  two  ways to use variables to show color, one is
  1455.      for shades of grey:
  1456.  
  1457.           for i = 0 to 10
  1458.              box 3 .2 fill (i/10)
  1459.              rmove 0 .2
  1460.           next i
  1461.  
  1462.      The  other  is  for  passing  a  color  name  as a variable:
  1463.  
  1464.           sub stick c$
  1465.              box .2 2 fill c$
  1466.           end sub
  1467.           @stick "green"    
  1468.  
  1469.      Remember  a  fill pattern completely obscures what is behind
  1470.      it,  so  the  following  command  would produce a box with a
  1471.      shadow:
  1472.  
  1473.           amove 4 4 
  1474.           box 3 2 fill grey10
  1475.           rmove -.1 .1
  1476.           box 3 2 fill white
  1477.           rmove .4 .4
  1478.           text hellow
  1479.  
  1480.  Device Drivers
  1481.  --------------
  1482.      GLE supports the following devices.
  1483.  
  1484.      Interactive:  IBM/PC  (BGI),  VT100,  REGIS  (VT125, VT240),
  1485.      TEK4010, VWS, XWindows.
  1486.  
  1487.      Output:  PostScript,  HPGL,  EPSON, EPSON 24pin, HP Deskjet.
  1488.  
  1489.      Keyboard Mappings:
  1490.  
  1491.      VT100         VT200         PC         Meaning 
  1492.      GOLD 1         F11         F1         Help 
  1493.      GOLD 2         F12         F2         Save 
  1494.      GOLD 3         F13         F3         Load 
  1495.      GOLD 4         F14         F4         Save-as 
  1496.      GOLD 9         F9         F9         Graph-menu 
  1497.      GOLD 0         F10         F10         Draw-it 
  1498.      Control+Z         Control+Z     Control+Z     Exit/Escape 
  1499.                          Alt+X         Exit/Escape 
  1500.      Control+E         Control+E             Calls VAX EDT 
  1501.      Control+F         Control+F             Toggle fast/slow text 
  1502.      Control+R         Control+R     F5         Shows errors 
  1503.                          Control+S     Shells to DOS 
  1504.  
  1505.  PC Screen Drivers
  1506.      Remember  that  what you see on the screen isn't always what
  1507.      you  will  get  on  the  printer. For example filled regions
  1508.      will  not be filled, and some characters may not look right.
  1509.  
  1510.      After   pressing  F10  and  drawing  the  graph  it  can  be
  1511.      annotated  by using the mouse (or arrow keys) to draw lines,
  1512.      text  and boxes. To draw lines simply click on the points of
  1513.      the  line,  use the right hand mouse button to `pick up' the
  1514.      pen.
  1515.  
  1516.      To  draw  text  press the letter `t' and then click on where
  1517.      you would like the text to be drawn.
  1518.  
  1519.      All  movements  are  rounded to the grid size settings which
  1520.      are 1.0cm, 0.1cm, 0.01cm etc.
  1521.  
  1522.      The  height and color of the text/lines is determined by the
  1523.      current settings at the end of the GLE file.
  1524.  
  1525.      If  there  is  no mouse driver loaded then a cross-hair will
  1526.      appear  and  it  can  be  moved around using the arrow keys.
  1527.      Press    `c'    to  click,  instead  of  the  mouse  button.
  1528.  
  1529.  PostScript Driver
  1530.      To print a GLE file to the laser printer type:
  1531.  
  1532.           $ cgle myfile /print
  1533.  
  1534.      or on a PC:
  1535.  
  1536.           C:\GLE> psgle myfile   
  1537.           C:\GLE> print myfile.ps 
  1538.  
  1539.      The  postscript  drivers  for  GLE will automatically flip a
  1540.      picture  to  best  fit  onto the page, e.g. a wide graph (as
  1541.      defined  by  the  size  command at the top) will be drawn in
  1542.      landscape  mode  and  a  tall  thin  graph  will be drawn in
  1543.      portrait mode.
  1544.  
  1545.      To  produce  an  .eps file on a VAX for inclusion in LaTeXor
  1546.      WordPerfect you would type:
  1547.  
  1548.           $ cgle myfile /dev=eps
  1549.  
  1550.      On a PC you would type:
  1551.  
  1552.           C:\GLE> psgle myfile  /eps
  1553.           (this creates myfile.eps, not myfile.ps)
  1554.  
  1555.      Inside your LaTeXdocument use the LaTeXcommand:
  1556.  
  1557.           \graphin{myfile.eps}{12.0cm}{3.0cm}{1.0}
  1558.  
  1559.      The  width  and  height  are  used by LaTeXto reserve enough
  1560.      space  for  the  drawing  and  the last parameter is a scale
  1561.      factor.
  1562.  
  1563.      The  laser  printer  driver  will  draw all zero width lines
  1564.      .02cm  wide  for  any  line  width  equal to zero, but if an
  1565.      lwidth  is greater than zero and less than or equal to .0001
  1566.      then  it  will  use a line width of 1 pixel. Without this it
  1567.      would  be  impossible  to  specify  a line width that didn't
  1568.      occasionally get rounded to 2 pixels.
  1569.  
  1570.  TEK4010 Driver
  1571.      This  driver  allows  initialization sequences to be defined
  1572.      with the symbols TEK_OPEN and TEK_CLOSE.
  1573.  
  1574.      On  a  VAX this is normally done by CGLECMD.COM so that when
  1575.      you  specify  /DEV=V550  the  assignments  are done for you.
  1576.      (V550 = Visual 550)
  1577.  
  1578.  HPGL Driver
  1579.  
  1580.  Device Drivers>HPGL Driver
  1581.      This  driver  allows  initialization sequences to be defined
  1582.      in  the  symbols  HPGL_OPEN  and  HPGL_CLOSE.  On the PC use
  1583.      environment  variables  and on the VAX use DCL symbols. Also
  1584.      HPGL_WIDTH  and  HPGL_HEIGHT  can  be  defined  for  non  A3
  1585.      plotters.
  1586.  
  1587.      On  a  VAX this is normally done by CGLECMD.COM so that when
  1588.      you  specify  /DEV=HPA4  the  assignments  are done for you.
  1589.  
  1590.      The   HPGL  driver  assigns  the  following  colors  to  pen
  1591.      numbers:
  1592.  
  1593.      1=black,    2=red,    3=green,  4=blue,  5=magenta,  6=white
  1594.  
  1595.  PC Bitmap Drivers
  1596.      GLE  supports the EPSON 8 and 24 pin and HP deskjet/laserjet
  1597.      printers.  To  support  bitmap devices which require a large
  1598.      amount  of memory GLE first writes a device independent file
  1599.      OUT.DVI,   then  the  appropriate  bitmap  driver  for  your
  1600.      printer  will  read  the  OUT.DVI  file  and create a bitmap
  1601.      which it then prints to LPT1:
  1602.  
  1603.           C:> dvigle myfile      (produces OUT.DVI)
  1604.           C:> dviepson           (creates bitmap and prints to LPT1:)
  1605.  
  1606.      The output options are:
  1607.  
  1608.           C:> dviepson           Standard EPSON printers 
  1609.           C:> dviep24            24 Pin EPSON printers (180dpi)
  1610.           C:> dvilj              HP Laser jet, Desk jet (150 dpi)
  1611.           C:> dvilj300           HP Laser jet, Desk jet (300 dpi)
  1612.  
  1613.      The    high   resolution  drivers  (dviep24,  dvilj300)  are
  1614.      significantly  slower  than  the  low  resolution drivers so
  1615.      would only be used for final output.
  1616.  
  1617.      See  the  file  AAREADME.GLE  for  the latest information on
  1618.      drivers.
  1619.  
  1620.  Fonts (font mapping)
  1621.      By  default the generic fonts (rm, rmb, ss, tt etc) will all
  1622.      map  to  PLSR  (plotter  simplex  roman)  on BITMAP and HPGL
  1623.      drivers.  To  make  this  happen  on  other  drivers put the
  1624.      command  plotter fonts immediately after the size command at
  1625.      the top of the GLE file.
  1626.  
  1627.      A  typical  result of this change in fonts is that something
  1628.      that  lines  up  on the screen will not line up when printed
  1629.      to  an  EPSON  printer. If this happens then use the plotter
  1630.      fonts command.
  1631.  
  1632.      If  a  character  is  missing  from  a  font,  or  isn't the
  1633.      particular  variation  you  like, you can define a character
  1634.      to be from a different font in this way:
  1635.  
  1636.           \chardef{%}{{\setfont{texcmr}\char{37}}} 
  1637.           \chardef{[}{{\setfont{texcmr}\char{91}}} 
  1638.           \chardef{]}{{\setfont{texcmr}\char{93}}} 
  1639.  
  1640.      On  the  PC  some  fonts  may  not be installed to save disk
  1641.      space.  When  one  of  the  missing  fonts  is called for, a
  1642.      replacement  font  will be displayed, this may look terrible
  1643.      and   some  special  characters  may  be  completely  wrong.
  1644.  
  1645.      More  importantly  if you use a font which does not have its
  1646.      font  metric  file  installed  (e.g.  C:/GLE/FONTS/PLSR.FMT)
  1647.      then   the  PostScript  driver  will  space  the  characters
  1648.      incorrectly.    This    can  be  fixed  by  extracting  that
  1649.      particular    metric    file   from  the  distribution  file
  1650.      CGLE_FVE.ZIP using PKUNZIP.
  1651.  
  1652.  Diagrams, Joining Named Objects
  1653.  -------------------------------
  1654.      To  draw  lines between boxes which contain text, first name
  1655.      each  box  as  it  is drawn and then use the join command to
  1656.      draw the lines between the boxes.
  1657.  
  1658.           box 2 3 fill blue  name square
  1659.           amove 5 5 
  1660.           begin box add .1  name titlebox
  1661.                text Title
  1662.           end box
  1663.           join square.tr -> titlebox.bc
  1664.  
  1665.      These  commands  draw  a  line from the ``Top Right'' of the
  1666.      square  to  the  ``Bottom  Centre'' of the titlebox, with an
  1667.      arrow at the titlebox end.
  1668.  
  1669.           join square - titlebox
  1670.  
  1671.      would  draw  a  line  from  the  centre of the square to the
  1672.      centre  of  the  titlebox but clipped correctly at the edges
  1673.      of both boxes.
  1674.  
  1675.           join square.tc <-> titlebox.v
  1676.  
  1677.      would  draw  a  vertical  line  from  the  top centre of the
  1678.      square    to    the  titlebox  with  arrows  at  both  ends.
  1679.  
  1680.      Named points on each box:
  1681.  
  1682.              .bl    Bottom left
  1683.              .bc    Bottom centre
  1684.              .br    Bottom right
  1685.              .cr    Centre right
  1686.              .tr    Top right
  1687.              .tc    Top centre
  1688.              .tl    Top left
  1689.              .cl    Centre left
  1690.              .v     Vertical line
  1691.              .h     Horizontal line
  1692.              .cc    Centre centre
  1693.              .ci    Circle clipping    (for drawing lines to a circle)
  1694.  
  1695.      To  draw  lines to a given point, simply move there and save
  1696.      that point as a named object.
  1697.  
  1698.          rmove 2 3
  1699.          save apoint
  1700.          join apoint - square
  1701.  
  1702.  Filling, Stroking and Clipping Paths
  1703.  ------------------------------------
  1704.      It  is  possible to set up arbitrary clipping regions. To do
  1705.      this  draw  a  shape  and  make  it into a path by putting a
  1706.      begin  path  clip  ...  end  path,  around it. Then draw the
  1707.      things  to  be  clipped  by that region. To clear a clipping
  1708.      path  surround  the whole section of GLE commands with begin
  1709.      clip ... end clip
  1710.  
  1711.      Characters  can  be used to make up clipping paths, but only
  1712.      the  PostScript  fonts will currently work for this purpose.
  1713.  
  1714.      Clipping  doesn't  work  on  the  screen or p79 devices, but
  1715.      does  on  the  laser printer. See example CLIP.GLE at end of
  1716.      manual.
  1717.  
  1718.           size 10 5 
  1719.           begin clip       ! Save current clipping path
  1720.              begin path clip stroke  ! Define new clipping region
  1721.                 amove 2 2 
  1722.                 box 3 3 
  1723.                 amove 6 2 
  1724.                 box 3 3 
  1725.              end path
  1726.              amove 2 2 
  1727.              set hei 3
  1728.              text Here is clipped text
  1729.           end clip         ! Restore original clipping path
  1730.  
  1731.  Using Variables
  1732.  ---------------
  1733.      GLE  has  two types of variables, floating point and string.
  1734.      String  variables  always  end  with a dollar sign. A string
  1735.      variable  contains  text  like  ``Hello  this  is  text'', a
  1736.      floating  point  variable  can  only  contain  numbers  like
  1737.      1234.234.
  1738.  
  1739.           name$ = "Joe"
  1740.           height = 6.5    ! Height of person
  1741.           shoe = .05      ! shoe adds to height of person
  1742.           amove 1 1
  1743.           box .2 height+shoe
  1744.           write name$    
  1745.  
  1746.  Programming Loops
  1747.  -----------------
  1748.      The  simple  way  to  draw  a  6 $$ 8 grid would be to use a
  1749.      whole mass of line commands:
  1750.  
  1751.           amove 0 0 
  1752.           rline 0 8 
  1753.           amove 1 0 
  1754.           rline 1 8 
  1755.           ...
  1756.           amove 6 0 
  1757.           rline 6 8
  1758.  
  1759.      this  would  be  laborious  to  type  in,  and  would become
  1760.      impossible  to  manage with several grids. By using a simple
  1761.      loop this can be avoided:
  1762.  
  1763.           for x = 0 to 6
  1764.              amove x 0 
  1765.              rline x 8 
  1766.           next x
  1767.           for y = 0 to 8
  1768.              amove 0 y 
  1769.              rline 6 y 
  1770.           next y 
  1771.  
  1772.      To  draw  lots  of  grids  all  of  different  dimensions  a
  1773.      subroutine  can  be  defined  and then used again and again:
  1774.  
  1775.           ! define the subroutine
  1776.           sub grid nx ny 
  1777.           gsave
  1778.           begin origin
  1779.           for x = 0 to nx
  1780.              amove x 0 
  1781.              aline x ny 
  1782.           next x
  1783.           for y = 0 to ny
  1784.              amove 0 y 
  1785.              aline nx y 
  1786.           next y 
  1787.           end origin
  1788.           end sub
  1789.           ! now draw the grids wherever
  1790.           amove 2 4
  1791.           @grid 6  8
  1792.           amove 2 2
  1793.           @grid 9 5
  1794.  
  1795.      Now  the  main  GLE  file  will  be  much  easier  to modify
  1796.      particularly  if  the  subroutine definition is moved into a
  1797.      separate file:
  1798.  
  1799.           size 10 10
  1800.           include griddef.gle
  1801.           amove 2 4
  1802.           @grid 2 4
  1803.           amove 2 2
  1804.           @grid 9 5
  1805.  
  1806.  Tables
  1807.  ------
  1808.  
  1809.  Markers
  1810.  -------
  1811.  
  1812.  Fonts
  1813.  -----
  1814.  
  1815.      font-name     Description 
  1816.      rm     Roman 
  1817.      rmb     Roman Bold 
  1818.      rmi     Roman Italic 
  1819.      ss     San Serif 
  1820.      ssb     San Serif Bold 
  1821.      ssi     San Serif Italic 
  1822.      tt     Typewriter 
  1823.      ttb     Typewriter Bold 
  1824.      tti     Typewriter Italic 
  1825.  
  1826.  
  1827.      font-name     Description 
  1828.      psagb     AvantGarde-Book 
  1829.      psagbo     AvantGarde-BookOblique 
  1830.      psbd     Bookman-Demi 
  1831.      psbdi     Bookman-DemiItalic 
  1832.      psbl     Bookman-Light 
  1833.      psbli     Bookman-LightItalic 
  1834.      psc     Courier 
  1835.      pscb     Courier-Bold 
  1836.      pscbo     Courier-BoldOblique 
  1837.      psco     Courier-Oblique 
  1838.      psh     Helvetica 
  1839.      pshb     Helvetica-Bold 
  1840.      pshbo     Helvetica-BoldOblique 
  1841.      psho     Helvetica-Oblique 
  1842.      psncsb     NewCenturySchlbk-Bold 
  1843.      psncsi     NewCenturySchlbk-Italic 
  1844.      psncsr     NewCenturySchlbk-Roman 
  1845.      pspr     Palatino-Roman 
  1846.      pstr     Times-Roman 
  1847.      psti     Times-Italic 
  1848.      pstb     Times-Bold 
  1849.      pstbi     Times-BoldItalic 
  1850.      pszcmi     ZapfChancery-MediumItalic 
  1851.      pszd     ZapfDingbats 
  1852.      pssym     Symbol 
  1853.  
  1854.      font-name     Description 
  1855.      texcmb     Computer Modern Bold 
  1856.      texcmex     Computer Modern Extensible 
  1857.      texcmitt     Computer Modern Italic Typewriter 
  1858.      texcmmi     Computer Modern Maths Italic 
  1859.      texcmr     Computer Modern Roman 
  1860.      texcmss     Computer Modern Sans Serif 
  1861.      texcmssb     Computer Modern Sans Serif Bold 
  1862.      texcmssi     Computer Modern Sans Serif Italic 
  1863.      texcmsy     Computer Modern Symbol 
  1864.      texcmti     Computer Modern Text Italic 
  1865.      texcmtt     Computer Modern Typewriter Text 
  1866.  
  1867.      font-name     Description 
  1868.      plcc     Complex Cartographic 
  1869.      plcg     Complex Gothic 
  1870.      plci     Complex Italic 
  1871.      plcr     Complex Roman 
  1872.      plcs     Complex Script 
  1873.      pldr     Duplex Roman 
  1874.      plge     Gothic English 
  1875.      plgg     Gothic German 
  1876.      plgi     Gothic Italian 
  1877.      plsa     Simplex Ascii 
  1878.      plsg     Simplex German 
  1879.      plsr     Simplex Roman 
  1880.      plss     Simplex Script 
  1881.      plsym1     Symbols one 
  1882.      plsym2     Symbols two 
  1883.      plti     Triplex Italic 
  1884.      pltr     Triplex Roman 
  1885.      plba     Block Ascii 
  1886.  
  1887.  Functions
  1888.  ---------
  1889.  
  1890.      Function Name         Returns 
  1891.      TIME$()             current time e.g. ``11:44:27'' 
  1892.      DATE$()             current date e.g. ``Tue Apr 09 1991'' 
  1893.      LEFT$(str$,exp)         left exp characters of str$ 
  1894.      RIGHT$(str$,exp)         rest of str$ starting at exp 
  1895.      SEG$(str$,exp1,exp2)     str$ from exp1 to exp2 
  1896.      NUM$(exp)             string representation of exp 
  1897.      NUM1$(exp)         as above but with no spaces 
  1898.      VAL(str$)             value of the string str$ 
  1899.      POS(str1$,str2$,exp)     position of str2$ in str1$ from exp 
  1900.      LEN(str$)             the length of str$ 
  1901.  
  1902.      Function Name         Returns 
  1903.      ABS(exp)             absolute value of expression 
  1904.      ATN(exp)             arctan 
  1905.      COS(exp)             cosine 
  1906.      EXP(exp)             exponent 
  1907.      FIX(exp)             exp rounded towards 0 
  1908.      INT(exp)             integer part of exp 
  1909.      LOG(exp)             log to base e of exp 
  1910.      LOG10(exp)         log to base 10 of exp 
  1911.      SGN(exp)              returns  1  or -1.
  1912.      SIN(exp)             sine of exp 
  1913.      SQR(exp)             exp squared 
  1914.      TAN(exp)             tangent of exp 
  1915.      NOT(exp)             logical not of exp 
  1916.      RND(exp)             random number from seed exp 
  1917.      SQRT(exp)             square root of exp 
  1918.  
  1919.      Function Name         Returns 
  1920.      XEND()             the x end point of a text string when drawn 
  1921.      YEND()             the y end point of a text string when drawn 
  1922.      XPOS()             the current x point 
  1923.      YPOS()             the current y point 
  1924.      TWIDTH(str$)          the width of str$ assuming current font, size
  1925.      THEIGHT(str$)          the  height  of  str$ assuming current font, size 
  1926.      TDEPTH(str$)          the  depth of str$ 
  1927.      XG(xexp)             converts units of last graph to abs cm. 
  1928.      YG(yexp)              converts  units  of last graph to abs cm. tabular
  1929.  
  1930.